		
		//预览图片
		function changeSrc(){
			var	picUrl = document.getElementById("imageMap").value;
			if(checkPic(picUrl) == false){
				loadProductImage();
				return;
			}
			var imageDiv = document.getElementById("image-div");
			imageDiv.style.display = 'block';
			imageDiv.innerText = "";
		    var imgDiv = document.createElement("div");
		    document.body.appendChild(imgDiv);
		    imgDiv.style.width = "180px";    
		    imgDiv.style.height = "160px";
		    imgDiv.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod = scale)";   
		    imgDiv.filters.item("DXImageTransform.Microsoft.AlphaImageLoader").src = picUrl;
		    imageDiv.appendChild(imgDiv);
		}
		
		//验证图片
		function checkPic(picUrl){
			if(picUrl == "")
				return false;
			
			if(checkFileType(picUrl) == false)
				return false;
			
			img = document.createElement("img");
			img.src = picUrl;
			if(img.fileSize>102400){
			    alert("图片尺寸请不要大于100KB！");
			    return false;
			}
			return true;
		}

		//验证图片类型
		function checkFileType(picUrl){
			if(picUrl != ""){
				if(!/\.(gif|jpg|jpeg|png|GIF|JPG|PNG)$/.test(picUrl))
		        {
		          alert("图片格式有误，请重新上传！")
		          return false;
		        }
			}
			return true;   
		}
